var reviewSingle = {};
reviewSingle.methods = {};

$(function(){
    var year = new Date().getFullYear();//Current year.
    new Controller.DateSelect({
        content: ".shop-right-order",
        event: "hover",
        callback: function (selected) {
            vm.selectedStatus(selected);
            vm.refresh();
        },
        list: [{ name: "近三个月订单", value: "0" }, { name: "今日订单", value: "1" }, { name: year + "年订单", value: "2" }, { name: year+"年以前订单", value: "3" }],
    });


    // 分页
    var page = new Controller.PageControl();
    page.init({
        totalCount:20,    //总页数
        conter:".shop-page",    //容器选择器
        nowPage:1,        //当前页，默认第几页
        //callback:fun,       //点击回调
        // gotoCallBack:fun    //跳转回调
    });

     reviewSingle.methods.ajaxLoad();
})

// ajax Load其他晒单页面
reviewSingle.methods.ajaxLoad = function(){
    $(".shop-user-reviewSingle-cut li").on("click",function(){
        $(".shop-user-reviewSingle-cut li").removeClass("shop-click");
        $(this).find("a").parents("li").addClass("shop-click");
        var url = $(this).find("a").attr("href");
        
        $("id").load(function(){
            $(".close").click(function(){
             $(".detail").hide(); 
            });
          
         });         

        $(".shop-user-reviewSingle-con-box").load(url + " .shop-user-reviewSingle-con-box > *");
        return false;
    })
}

